<?php
include_once($_SERVER['DOCUMENT_ROOT'].'/includes/config.inc.php');
include_once("config.php");
getConfig();
checkActiveLogin();
getUserInfo();
?>
Please Wait...<br />
<br />
Creating Secure Connection...<br />
<br />
Logging You In...
<SCRIPT language="JavaScript">
function post_to_url(path, params, method) {
    method = method || "post"; // Set method to post by default, if not specified.

    // The rest of this code assumes you are not using a library.
    // It can be made less wordy if you use one.
    var form = document.createElement("form");
    form.setAttribute("method", method);
    form.setAttribute("action", path);

    for(var key in params) {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", key);
        hiddenField.setAttribute("value", params[key]);

        form.appendChild(hiddenField);
    }
	
	var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "submit");
        hiddenField.setAttribute("name", "submit");
		hiddenField.setAttribute("id", "submit");
        hiddenField.setAttribute("value","Login");
		hiddenField.setAttribute("style","display:none");

        form.appendChild(hiddenField);
		
		

    document.body.appendChild(form);    // Not entirely sure if this is necessary
	document.getElementById('submit').click();
}

post_to_url('https://www.edison.edu/webservices/internal/palms/login.php', {'user':'<?php echo $USER["sUname"] ?>', 'pass':'<?php echo $_SESSION['MM_Password'] ?>', 'action':'processLogin'});
</SCRIPT>